export function searchColumns() {
  return [
    {
      prop: 'channel',
      placeholder: '请输入渠道号/渠道商/渠道名称/渠道别名',
    },
    {
      prop: 'film_name',
      placeholder: '请输入影片名称',
    },
    {
      prop: 'film_episode_no',
      placeholder: '请输入集名称',
    },
  ]
}

export function tableColumns() {
  return [
    {
      width: 80,
      label: '序号',
      prop: 'id',
    },
    {
      align: 'left',
      overHidden: true,
      label: '推广渠道',
      prop: 'channel',
      html: true,
      formatter: row =>
        `${row?.channel_no}\\${
          this.channelMap.find(item => item?.no === row?.channel_no)?.merchant
        }\\${this.channelMap.find(item => item?.no === row?.channel_no)?.name}\\${
          this.channelMap.find(item => item?.no === row?.channel_no)?.alias
        }`,
    },
    {
      overHidden: true,
      align: 'left',
      label: '影片名称',
      prop: 'film_name',
    },
    {
      width: 100,
      label: '集名称',
      prop: 'film_episode_no',
    },
    {
      overHidden: true,
      align: 'left',
      label: '推广链接',
      prop: 'generation_link',
    },
    {
      width: 140,
      label: '创建时间',
      prop: 'create_at',
      formatter: row => this.$formatTime(row?.create_at),
    },
    {
      width: 80,
      label: '影片状态',
      prop: 'status',
      html: true,
      formatter: row =>
        `<span class="${row?.status === 0 ? 'text-success' : 'text-warning'}">${
          row?.status === 0 ? '开启' : '停用'
        }</span>`,
    },
  ]
}
